﻿

namespace Simple.Services
{
    public class CourseTypeInputModel : ModelBase
    {
        /// <summary>
        /// 主键
        /// </summary>
        public Guid? Id { get; set; }

        /// <summary>
        /// 分类名称
        /// </summary>
        [Required(ErrorMessage = "分类名称不能为空")]
        public string? Name { get; set; }

        /// <summary>
        /// 是否可见
        /// </summary>
        public bool? IsPublic { get; set; }

        /// <summary>
        /// 排序
        /// </summary>
        public int Sort { get; set; } = 0;

        /// <summary>
        /// 描述
        /// </summary>
        public string? Description { get; set; }

        public override void ConfigureMapper(Profile profile)
        {
            profile.CreateMap<CourseType, CourseTypeInputModel>();

            profile.CreateMap<CourseTypeInputModel, CourseType>();

        }
    }
}
